#! /usr/bin/env python

PACKAGE='theora_image_transport'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

optimize_for_enum = gen.enum([ gen.const("Bitrate", int_t, 0, "Aim for requested bitrate"),
                               gen.const("Quality", int_t, 1, "Aim for requested quality") ],
                             "Enum to control whether optimizing for bitrate or quality")
gen.add("optimize_for", int_t, 0, "Try to achieve either 'target_bitrate' or 'quality'", 1, 0, 1,
        edit_method = optimize_for_enum)
gen.add("target_bitrate", int_t, 0, "Target encoding bitrate, bits per second", 800000, 0, 99200000)
gen.add("quality", int_t, 0, "Encoding quality", 31, 0, 63)
gen.add("keyframe_frequency", int_t, 0, "Maximum distance between key frames", 64, 1, 64)

exit(gen.generate(PACKAGE, "TheoraPublisher", "TheoraPublisher"))
